package routers

import (
	"gin.study/control"
	"github.com/gin-gonic/gin"
)

func GroupRouter(c *gin.Engine) {
	//路由分组
	// 路由组1 ，处理GET请求
	v1 := c.Group("/v1")
	// {} 是书写规范
	{
		v1.GET("/login", control.Login)
		v1.GET("submit", control.Submit)
	}
	v2 := c.Group("/v2")
	{
		v2.POST("/login", control.Login)
		v2.POST("/submit", control.Submit)
	}
}


